<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title></title>
    </head>
    <body>
        <canvas id="canvas1" width="600" height="600"></canvas>
        <script type="text/javascript">

            var canvas1 = document.querySelector("#canvas1");
            var ctx = canvas1.getContext("2d");

            ctx.font = "50px 微软雅黑";

            ctx.fillText("helloworld",100,100);
            ctx.strokeText("Hi",100,200);
            ctx.fill();
            ctx.stroke();





        </script>
    </body>
</html>